package com.ipet.modules.sys.service.impl;

import com.ipet.common.utils.PageUtils;
import com.ipet.common.utils.Query;
import com.ipet.modules.sys.dao.PetChargesDao;
import com.ipet.modules.sys.entity.PetChargesEntity;
import com.ipet.modules.sys.service.PetChargesService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;


@Service("petChargesService")
public class PetChargesServiceImpl extends ServiceImpl<PetChargesDao, PetChargesEntity> implements PetChargesService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<PetChargesEntity> page = this.selectPage(
                new Query<PetChargesEntity>(params).getPage(),
                new EntityWrapper<PetChargesEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<Map<String, Object>> getStatistics() {
        return baseMapper.getStatistics();
    }

    @Override
    public List<Map<String, Object>> getStatisticsByMonths() {
        return baseMapper.getStatisticsByMonths();
    }

}
